<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .title {
            line-height: 40px;
            text-align: center;
            margin: 50px 0;
        }

        .block {
            margin: 30px;
        }

        .block input {
            height: 40px;
            line-height: 40px;
            border: 1px solid #ccc;
            outline: none;
            padding-left: 20px;
            border-radius: 5px;
            width: 100%;
            box-sizing: border-box;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="title">登录页</div>
        <div class="block">
            <input type="text" placeholder="输入手机号" v-model="form.phone">
        </div>
        <div class="block">
            <input type="password" placeholder="输入密码" v-model="form.pass">
        </div>
        <div class="block">
            <input type="button" value="登录" @click="login">
        </div>
    </div>

</body>

</html>
<script src="./vue-2.5.21.js"></script>
<script>
    var v = new Vue({
        el: '#app',
        data: {
            form: { phone: '', pass: '' }

        },
        methods: {
            login() {
                console.log(this.form);
            }
        }
    })
</script>